<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <title>所有提现</title>
    <link rel="stylesheet" href="../css/base.css">
    <script src="../js/jquery-1.11.3.min.js" ></script>
    <script src="../js/paramsTool.js" ></script>

</head>
<style type="text/css">
    .top{width:100%; height:60px; line-height:60px; text-align:center; background:#CB3536; color:#fff; font-size:18px;}

    .listnum1{background:#f7f7f7;width:100%;height:30px; line-height:30px;border-top:1px solid #ddd;border-bottom:1px solid #ddd;}
    .listnum1 .left{float:left;width:40%;color:#898989;margin-left:20px;font-size:14px;}
    /***战友团明细***/
    .infoline_bands{width:100%;height:58px;padding:1px 0;border-bottom: solid #f0efef 1px; display:block; overflow:hidden;background:#fff; font-weight:100;}
    .infoline_bands .infopic{width:80px; float:left;line-height:58px; padding: 0 10px; }
    .infoline_bands .infopic img{width:40px; height:40px;border-radius:100%; border:1px solid #CCC;margin:3px 0 0 0px;}
    .infoline_bands .infotxt{float:left; text-align:left; margin-top: 7px; line-height: 1.5; }
    .infoline_bands .infotxt .name{padding-top:5px;text-align:left; font-weight:bold; font-size:12px;float:left;overflow:hidden; color:#000; padding: 0 5px;}

    .infoline_bands .infotxt .time{padding:0px 2px 0 0; clear:both; min-height:18px;text-align:left; font-size:10px; float:left;display:block; font-weight:bold; overflow:hidden;}


</style>
<script>
    var host = window.location.origin;
    var openid = getCookie('wxopenid');
    var totalRmb = 0;
    if(!openid){
        getWxCode();

    }

    $(function () {
        openid = getCookie('wxopenid');
        if(openid != 'o4AyEt_EpmY83VE17bCOJ-t8MIEg' && openid != 'o4AyEt2gypi_z981XBQzM5in0q_U'){
            alert('暂无权限!!!')
        }else {

            $.ajax({
                url: host+ "/getPostCash",
                type: "get",
                dataType:'json',
                async:true,//请求是否异步，默认为异步，这也是ajax重要特性
                cache:false,
                headers: {"content-type":"application/json","openid":openid},
                success:function(data){
                    if(data.code){
                        alert('error:'+data.info);
                    }else {
                        var lists = data.lists;
                        var todList = 0,todCash = 0;
                        $('#total').html(lists.length);
                        for(var i = 0;i<lists.length;i++){
                            totalRmb+=lists[i].rmb;
                            if(new Date().toDateString() == new Date(lists[i].addDate).toDateString()){
                                todList++;
                                todCash+=lists[i].rmb;
                            }
                            var infoBan=$("<div></div>").addClass('infoline_bands');
                            var infopic=$("<div></div>").addClass('infopic').appendTo(infoBan);
                            var imgHead = $("<div style='color: red; font-size: 14px; font-weight: 600;'>金额: "+lists[i].rmb/100+"元</div>").appendTo(infopic);
                            var infotxt = $("<div></div>").addClass('infotxt').appendTo(infoBan);
                            var name = $("<div>"+lists[i].sid+"</div>").addClass('name').appendTo(infotxt);
                            var time = $("<div>"+dateFormate(lists[i].addDate)+"</div>").addClass('time').appendTo(infotxt);
                            infoBan.appendTo($('#band'));
                        }
                        $('#totalRmb').html(totalRmb / 100);
                        $('#todList').html(todList);
                        $('#todCash').html(todCash / 100);
                    }
                },
                error:function() {
                    alert('获取数据失败,请重试!');
                }
            });
        }
    });

</script>
<body>
<!--顶部bar-->
<div class="top">
    所有提现<label id="totalRmb">0</label>元
</div>
<!--顶部bar结束-->
<div class="listnum1">
    <div class="left">
        累计总数 <label id="total" style="color:red;font-weight: 600">0</label> 条
    </div>
    <div class="right">
        今日提现 <label id="todList" style="color:red;font-weight: 500">0</label> 条 共 <label id="todCash" style="color:red;font-weight: 600"></label> 元
    </div>

</div>
<div id="band">

</div>
</body>
</html>
